import { createBrowserRouter } from 'react-router-dom';
import Register from '../pages/auth/Register';
import Login from '../pages/auth/Login';
import ForgotPassword from '../pages/auth/ForgotPassword';
import Profile from '../pages/user/Profile';
import Passkey from '../pages/user/Passkey';
import MyDownloads from '../pages/user/myDownload';
import ManageUploads from '../pages/user/upload';
import InvitationHistory from '../pages/user/InvitationHistory';
import NetworkHome from '../pages/network/NetworkHome';
import NetworkDetail from '../pages/network/NetworkDetail';
import CreateNetwork from '../pages/network/CreateNetwork';
import NetworkManage from '../pages/network/NetworkManage';
import Categories from '../pages/categories/categories'; 
import ResourceDetail from '../pages/categories/ResourceDetail'; 
import PointsHome from '../pages/points/PointsHome';
import PointsHistory from '../pages/points/PointsHistory';
import NetworkPoints from '../pages/points/NetworkPoints';
import Help from '../pages/help';

export const router = createBrowserRouter([
  {
    path: '/',
    element: <Categories />,
  },
  {
    path: '/login',
    element: <Login />,
  },
  {
    path: '/register',
    element: <Register />,
  },
  {
    path: '/forgot-password',
    element: <ForgotPassword />,
  },
  {
    path: '/user/profile',
    element: <Profile />,
  },
  {
    path: '/user/passkey',
    element: <Passkey />,
  },
  {
    path: '/user/invitation-history',
    element: <InvitationHistory />,
  },
  {
    path: '/user/myDownload',
    element: <MyDownloads />,
  },
  {
    path: '/user/upload',
    element: <ManageUploads />,
  },
  {
    path: '/network',
    element: <NetworkHome />,
  },
  {
    path: '/network/create',
    element: <CreateNetwork />,
  },
  {
    path: '/network/:networkId',
    element: <NetworkDetail />,
  },
  {
    path: '/network/:networkId/manage',
    element: <NetworkManage />,
  },
  {
    path: '/categories',
    element: <Categories />,
  },
  {
    path: '/resource/detail/:resourceId',
    element: <ResourceDetail />,
  },
  // 积分系统路由
  {
    path: '/points',
    element: <PointsHome />,
  },
  {
    path: '/points/history',
    element: <PointsHistory />,
  },
  {
    path: '/points/Pnetwork/:networkId',
    element: <NetworkPoints />,
  },
  {
    path: '/help',
    element: <Help />,
  },
]); 